<template>
  <el-dialog
    :visible.sync="isVisible"
    title="审核备注"
    :close-on-click-modal="false"
    :close-on-press-escape="false"
    :modal-append-to-body="false"
    @close="closeDialog"
    width="30%"
    center
  >
    <el-form :model="form">
      <el-form-item>
        <el-input type="textarea" v-model="form.remarks"></el-input>
      </el-form-item>
    </el-form>
    <div slot="footer" class="dialog-footer">
      <el-button type="primary" @click="passRemark">确 定</el-button>
    </div>
  </el-dialog>
</template>
<script>
export default {
  name: "remarkDialog",
  props: {
    isShow: Boolean,
    rowId: Number
  },
  data() {
    return {
      dialogFormVisible: false,
      isVisible: this.isShow,
      form: {
        remarks: ""
      }
    };
  },
  methods: {
    closeDialog() {
      this.$emit("closeDialog");
    },
    passRemark() {
      let rowList = {
        roId: this.rowId,
        remark: this.form.remarks
      };
      this.$emit("passRemark", rowList);
      this.isVisible = false;
    }
  }
};
</script>
<style lang="scss">
.el-dialog__header {
  text-align: center;
}
.el-dialog__footer {
  text-align: center;
}
</style>